package com.bitdf.txing.group.ao;

import com.bitdf.txing.group.valid.SaveVaild;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author Lizhiwei
 * @date 2023/3/5 20:30:40
 * 注释：
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GroupCommentAo {
    /**
     * 组团ID
     */
    @NotNull(message = "组团id不得为空",groups = {SaveVaild.class})
    @Min(value = 0,message = "组团id非法",groups = {SaveVaild.class})
    @Max(value = Long.MAX_VALUE,message = "组团id非法",groups = {SaveVaild.class})
    private Long groupId;
    /**
     * 评论内容
     */
    @NotNull(message = "评论内容不得为空",groups = {SaveVaild.class})
    @Length(max = 500,min = 1,message = "评论内容请在500字以内",groups = {SaveVaild.class})
    private String content;
}
